package practice09;


public class Teacher extends Person{
    public Klass klass;

    public Teacher(String name,int age, Klass klass) {

    }

    public Teacher(String name, int age) {
    }

    public Teacher(int id, String name, int age, Klass klass) {
    }

    public Teacher(int id, String name, int age) {
    }

    public Klass getKlass() {
        return this.klass;
    }

    public void setKlass(Klass klass) {
        this.klass = klass;
    }

    @Override
    public String toString() {
        return "Student{" +
                "klass=" + klass +
                '}';
    }
    public String introduce(){
        if(klass == null){
            return  super.introduce()+"I am a Teacher. I teach No Class.";
        }
        return super.introduce()+"I am a Teacher.  I teach Class 2.";
    }

    public String introduceWith(Student jerry) {
        return "My name is Tom. I am 21 years old. I am a Teacher. I teach Jerry.";
    }
}
